<template>
  <!-- 延续信息 -->
  <div style="height:600px;">
    <FormPanel
      :list="initForm"
      :cols="3"
      :labelWidth="90"
      :isSubmitBtn="false"
      @formChange="formChangeHandle"
      class="mtop"
    />
  </div>
</template>

<script>
import { dictionary } from '@/utils/dictMixin';
export default {
  mixins: [dictionary],
  props: {
    value: {
      type: Number,
      required: true
    },
    infoBasic: {
      type: String,
      required: true
    }
  },
  data() {
    return {
      initForm: this.initFormFun(),
      formValue: {}
    };
  },
  created() {
    this.init();
  },
  methods: {
    //初始化数据
    init() {
      console.log('行id---->', this.value);
      console.log('是否编辑---->', this.infoBasic);
      //赋值
      // this.initForm.forEach(x => {
      //     x.initialValue = data.row[x.fieldName];
      // });
    },
    //搜索数据
    initFormFun() {
      return [
        {
          type: 'SELECT',
          label: '战败类型',
          fieldName: 'field2',
          initialValue: '',
          disabled:true, 
          itemList: this.createDictList('1008')
        },
        {
          type: 'DATE',
          label: '申请时间',
          fieldName: 'field6',
          valueFormat: 'yyyy-MM-dd',
          style: { width: '100%' },
          disabled:true, 
          initialValue: ''
        },
        {
          type: 'INPUT',
          label: '战败品牌',
          fieldName: 'field3',
          disabled:true, 
          initialValue: ''
        },
        {
          type: 'SELECT',
          label: '战败车型',
          fieldName: 'field4',
          initialValue: '',
          disabled:true, 
          itemList: this.createDictList('1008')
        },
        {
          type: 'TEXT_AREA',
          label: '战败原因',
          fieldName: 'field10',
          rows: 1,
          disabled:true, 
          initialValue: ''
        },
        {
          type: 'TEXT_AREA',
          label: '审批意见',
          fieldName: 'field23',
          rows: 2,
          initialValue: ''
        }
      ];
    },
    formChangeHandle(val) {
      this.formValue = val;
    }
  }
};
</script>